package com.whf.android.jar.util.color;

import android.graphics.Color;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Stone
 * @version V1.0
 * @description: 创建颜色工具
 * @date 10/25/18 09:22
 * @email redsstone@163.com
 */
public class CreateUtil {

    /**
     * 随机生成多个颜色值
     *
     * @param count 颜色值的数量
     * @return
     */
    public static List<Integer> createColors(int count) {
        ColorCreate colorUtil = new ColorCreate();
        List<ColorRGB> colorRGBS = colorUtil.createColorRGBs(count);
        List<Integer> colors = new ArrayList<>();
        for (ColorRGB colorRGB : colorRGBS) {
            Integer rgb = Color.rgb(colorRGB.getR(), colorRGB.getG(), colorRGB.getB());
            colors.add(rgb);
        }
        return colors;
    }
}
